
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 14318
  Date: 2021/12/3
  Time: 21:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>

    <title>$Title$</title>

</head>

<body>
<form action="${pageContext.request.contextPath}/delete" method="post">
<table>

    <tr>

        <th>&nbsp;</th>

        <th>学号</th>

        <th>姓名</th>

        <th>年龄</th>

        <th>性别</th>

    </tr>

    <c:forEach items="${pageData.list}" var="student">

        <tr>

            <td><input type="checkbox" name="ids" value="${student.id }"/></td>

            <td>${student.code}</td>

            <td>${student.username}</td>

            <td>${student.age}  </td>

            <td>${student.gender}</td>
            <td><a href="${pageContext.request.contextPath}/delete/${student.id }">删除</a></td> |
            <td><a href="${pageContext.request.contextPath}/edit/${student.id }">修改</a></td>
        </tr>

    </c:forEach>

    <tr>

        <td class="td2">

            <span>第${pageData.currPage}/ ${pageData.totalPage}页</span>

            <span>总记录数：${pageData.totalCount } 每页显示: ${pageData.pageSize}</span>

            <span>

              <c:if test="${pageData.currPage != 1}">

                  <a href="${pageContext.request.contextPath }/page?currentPage=1">[首页]</a>

                  <a href="${pageContext.request.contextPath }/page?currentPage=${pageData.currPage-1}">[上一页]</a>

              </c:if>

              <c:if test="${pageData.currPage != pageData.totalPage}">

                  <a href="${pageContext.request.contextPath }/page?currentPage=${pageData.currPage+1}">[下一页]</a>

                  <a href="${pageContext.request.contextPath }/page?currentPage=${pageData.totalPage}">[尾页]</a>

              </c:if>

            </span>

        </td>

    </tr>

</table>
    <input type="submit" value="批量删除">
</form>
</body>

</html>
